#include "bsp_timer.h"

static uint32_t g_SystemTick=0;


void timer1_init(void)
{
    R_AGT_Open(&g_timer1_ctrl, &g_timer1_cfg);
    R_AGT_Start(&g_timer1_ctrl);
}

void g_timer1_callback(timer_callback_args_t *p_args)
{
     if(TIMER_EVENT_CYCLE_END==p_args->event)
     {
         g_SystemTick++;
     }
}

uint32_t GetSysTick(void)
{
    return g_SystemTick;
}
